//
function ajax(option) {
    var xhr = new XMLHttpRequest();
    xhr.open(option.type, option.url, option.async);
    xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencode');
    xhr.onreadystatechange = function() {
        if (xhr.readyState !== 4) return;
        if (xhr.status === 200) {
            option.success(xhr.responseText);
        }
    };

    xhr.send();
}